package com.jumpy;

import org.andengine.engine.camera.Camera;
import org.andengine.engine.options.EngineOptions;
import org.andengine.engine.options.ScreenOrientation;
import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.andengine.entity.scene.Scene;
import org.andengine.ui.activity.SimpleBaseGameActivity;

import com.jumpy.entities.JumpyScene;
import com.jumpy.managers.ResourceManager;

public class MovingRect extends SimpleBaseGameActivity {
	// ===========================================================
	// Constants
	// ===========================================================

	public static final int CAMERA_WIDTH = 480;
	public static final int CAMERA_HEIGHT = 720;

	// ===========================================================
	// Fields
	// ===========================================================

	// ===========================================================
	// Constructors
	// ===========================================================

	// ===========================================================
	// Getter & Setter
	// ===========================================================

	// ===========================================================
	// Methods for/from SuperClass/Interfaces
	// ===========================================================

	@Override
	public EngineOptions onCreateEngineOptions() {
		final Camera camera = new Camera(0, 0, MovingRect.CAMERA_WIDTH,
				MovingRect.CAMERA_HEIGHT);

		return new EngineOptions(true, ScreenOrientation.PORTRAIT_FIXED,
				new RatioResolutionPolicy(MovingRect.CAMERA_WIDTH,
						MovingRect.CAMERA_HEIGHT), camera);
	}

	@Override
	public void onCreateResources() {

		ResourceManager.loadResources(this);

	}

	@Override
	public Scene onCreateScene() {
		// this.mEngine.registerUpdateHandler(new FPSLogger());

		return new JumpyScene();
	}
}